//
//  CMRes.swift
//  covermedia
//
//  Created by Travel on 16/1/26.
//  Copyright © 2016年 covermedia. All rights reserved.
//

import Foundation
import ObjectMapper

open class CMResBase: Mappable {
    public var message: String? = ""
    public var status: Int = 0

    required public init?(map: Map) {
    }

    open func mapping(map: Map) {
        message <- map["message"]
        status <- map["status"]
    }

    /// 是否成功
    public var isSucceed: Bool {
        return 0 == status
    }
}
